<template>
  <div :class="dark ? 'dark-title-container' : 'title-container'">
    <div :class="dark ? 'dark-title-text' : 'title-text'">{{ title }}</div>
  </div>
</template>

<script>
export default {
  name: "title-comp",
  props: {
    title: {
      type: String,
      default: "标题",
    },
    dark: {
      type: Boolean,
      default: false,
    },
  },
};
</script>

<style scoped>
.title-container {
  margin: 5px 0 10px 0;
  width: 100%;
  height: 30px;
  border-left: 3px solid #5a9cf8;
  background-color: #e9e9eb;
}
.dark-title-container {
  margin: 5px 0 10px 0;
  width: 100%;
  height: 30px;
  border-left: 3px solid #5a9cf8;
  background-color: #364152;
}
.title-text {
  height: 30px;
  line-height: 30px;
  padding-left: 20px;
  font-weight: 600;
}
.dark-title-text {
  height: 30px;
  line-height: 30px;
  padding-left: 20px;
  font-weight: 600;
  color: #fff;
}
</style>
